<?php  
	class Stu{
		var $name;
		var $age;

		function __construct($n,$a) {
		   $this->name = $n;
		   $this->age = $a;
		}
		function read(){
			echo  "年龄".$this->age.$this->name."在读书";
		}
	}
	//创建一个Stu类的 学生对象实例
	$s1=new Stu("小蝶",20);
	//$s1->name="";
	//var_dump($s1->name);
	$s1->read();

	$s2=new Stu();

?>